#include <EEPROM.h>

// the current address in the EEPROM (i.e. which byte
// we're going to write to next)
int value = 1337;

void setup()
{
  Serial.begin(9600);
}

void loop()
{
  saveInt(&value, 0);
  delay(1000 * 600);
}

void saveInt(int* i, int offset){
  for(int j = 3; j >= 0; j--){
   //EEPROM.write(offset + j, *(byte*)(i + j));
   byte* b = (byte*)i;
   Serial.println(*(b + j), DEC);
  }
}
